home *** CD-ROM | disk | FTP | other *** search
- /* This file contains machine specific functions */
- #include <stdio.h>
- #include <unix.h>
- #include <types.h>
- #include <strings.h>
- #include "global.h"
-
- /* This function should put the tty in a mode such that signgle characters
- * can be read without waiting for a complete line. Echo should be on.
- */
- setrawmode()
- {}
-
- /* This function should restore the tty modes back to cooked mode */
- setcookedmode()
- {}
-
- /* This function return one charater form the keyboard. It will wait
- * for a character to be input. This function will echo the character.
- * This funtion will return afer each character is typed if raw is set
- */
- int
- getrch()
- {
- int c;
- c = getchar();
- return c & 0xff;
- }
-
- /* This function show clear screen and put cursor at top of screen */
- screen_clear()
- {
- eraseplot();
- }
-
- /*
- ** strcmpic: string compare, ignore case
- */
-
- stricmp(s1, s2)
- char *s1, *s2;
- {
- register char *u = s1;
- register char *p = s2;
-
- while(*p != '\0') {
- /* chars match or only case different */
- if(tolower(*u) == tolower(*p)) {
- p++; /* examine next char */
- u++;
- } else {
- break; /* no match - stop comparison */
- }
- }
-
- return(tolower(*u) - tolower(*p)); /* return "difference" */
- }
-